import rssSys from './rss.config.js'

export default {
    querySVIPConfigs() {
        return rssSys.get("/svip/list");
    },
    batchRemoveSvipConfig(ids) {
        return rssSys.delete("/svip" , {data: ids})
    },
    removeSvipConfig(id) {
        return rssSys.delete("/svip/" + id) ;
    },
    saveSvipConfig({name, price, exp, score, state}) {
        return rssSys.post("/svip" , {name, price, exp, score, state})
    },
    updateSvipConfig({name, price, exp, score, state, id}) {
        return rssSys.put("/svip/" + id , {id, name, price, exp, score, state})
    },
    queryResourceTypeList() {
       return rssSys.get("/rtype/list");
    },
    saveResourceType({name, state, pid}) {
        return rssSys.post("/rtype", {name, state, pid}) ;
    },
    modifyResourceType({name, state, pid, id}) {
        return rssSys.put("/rtype/" + id, {name, state, pid, id})
    },
    removeResourceType(typeId) {
        return rssSys.delete("/rtype/" + typeId) ;
    },
    batchRemoveResourceType(types) {
        return rssSys.delete("/rtype", {data: types}) ;
    },
    queryResources({page, rows, resourceName, keywords, state, start, end}) {
        return rssSys.get("/resource/list", {params: {page, rows, resourceName, keywords, state, start, end}}) ;
    },
    auditeResource({id, state, reason}) {
        return rssSys.put("/resource/audite", {id, state, reason}) ;
    },
    removeResource(resId) {
        return rssSys.delete("/resource/" + resId);
    },
    confCoreResource(resId) {
        return rssSys.put("/resource/core/" + resId) ;
    }

}